<?php

if (get_magic_quotes_gpc()) {
    function magicQuotes_awStripslashes(&$value, $key) {$value = stripslashes($value);}
    $gpc = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
    array_walk_recursive($gpc, 'magicQuotes_awStripslashes');
}

function myLog($value){
	$value = print_r($value,true);
    error_log("\n$value", 3, APP_LOG);
}



/**
 * Create a Json Output 
 * 
 * @param $pContent Mixed Value to display in Json Format  
 *
 */  
function json_out($pContent){
  header('Content-type: text/json');
  echo json_encode($pContent);  
}

/**
 * Clean string
 * @param $value String Value to clean 
 */ 
function _trim(&$value)
{
    $value = trim($value);   
}

